package models

import (
	"github.com/astaxie/beego/orm"
	_ "github.com/go-sql-driver/mysql"
)

//注册数据库
func RegisterDB() {
	orm.RegisterDriver("mysql", orm.DRMySQL)                                        //注册驱动
	orm.RegisterDataBase("default", "mysql", "fong:Pass-f0ng@/cinema?charset=utf8") //创建默认数据库
	orm.RegisterModel(new(User), new(Order), new(Film), new(Seat))                  //注册模型
}
